<?php 
    Yii::app()->clientScript->registerCssFile(
        Yii::app()->request->baseUrl.'/assets/884ba3ad/detailview/styles.css'
    );
    $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'iD_PREDIO.TX_DESCRICAO',
		'TX_NOME',
		'NU_CAPACIDADE'
	),
    ));
    echo '<table id="yw1" class="detail-view"><tbody><tr class="even"><th>Recursos</th><td>';
    $recursos = $model2->getRecursosByAmbienteView();
    foreach ($recursos as $key => $value) {
        echo '<span>' . $key . ' - ' . $value . ' unidade(s)' . '</span><br>';
    }
    echo '</td></tr></table>';
    echo '<table id="yw2" class="detail-view"><tbody><tr class="odd"><th>Usos</th><td>';
    for ($i = 0; $i < count($model->usos); $i++) {
        echo '<span>' . $model->usos[$i]->TX_DESCRICAO . '</span><br>';
    }
    echo '</td></tr></table>';

?>